#pragma once

namespace Tmpl {

struct UnitData;
class Empire;
class Entity;
class World
{
public:
	static void Init();
	static void Clear();

	static void GenerateMap(int seed, int difficulty);

	static JobHandle Update(JobHandle dependency);

	static void CreateWorld(int empires);
	static void Render(float dt, const Vec2f& camPos, float zoom);

	// Empires
	static int GetEmpireCount();
	static int NewEmpire(const char* fileName);
	static Empire* GetEmpire(int id);

	// Entities
	static int GetEntityCount();
	static Entity* GetEntity(int arrayIdx);
	static Entity* GetEntityById(int id);
	static void AddEntity(int empireId, Vec2f pos, Vec2f facing, const char* unitName, int level);
	static void AddEntity(int empireId, int ownerId, Vec2f pos, Vec2f facing, const UnitData& data);
	static void HandleEntityMessages();
};

}; // namespace Tmpl